Skip to content

integrity: micro-batch-aware MFU ceiling (closes the #1217 compute-forgery class) - #96

Merged
bitzic merged 2 commits into
RalphLabsAI:mainfrom
karpabot:feat/microbatch-mfu-ceiling
Jul 3, 2026
Merged

integrity: micro-batch-aware MFU ceiling (closes the #1217 compute-forgery class)#96
bitzic merged 2 commits into
RalphLabsAI:mainfrom
karpabot:feat/microbatch-mfu-ceiling

Conversation

@karpabot

@karpabot karpabot commented Jul 3, 2026

Copy link
Copy Markdown

Why

Live king #1217 (5FTfrwU3) was a compute forgery that passed every gate. It declared 2.62B tokens in 8,074s at micro_batch=8 = 324k tok/s / 50% MFU — under the flat 70% cap. I rented an H100 and ran its exact recipe+config: micro_batch=8 tops out at 41.7k tok/s (reproduced 3×; ~70k even scaled to SXM). Its real wall was ~7-10h, over the 5h budget — the wall_clock_s was forged ~4× down.

The forgery is invisible to existing gates because uniform wall-scaling preserves the log's tps-identity + jitter (log-integrity gate) and the aggregate MFU gate is blind to micro_batch: the per-forward matmul M-dim is micro_batch*seq_len, and small batches physically can't sustain high throughput.

What

check_compute_plausibility now uses a micro-batch-aware ceiling instead of the flat 70%:

effective batch (micro_batch·seq_len) MFU ceiling
≥ 65536 70% (unchanged)
32768 60%
16384 50%
8192 42%
4096 (#1217) 33% ← rejects 50%
< 4096 25%

Ceilings are ~3× the empirically-achieved MFU (H100, seq 512: M=4096→11%, 32768→21%, 65536→27%), so honest and even well-optimized runs never trip them; unknown config falls back to the flat cap (backward-compatible). The restored king 5CqhtHE7 (ubatch-64, 21%) and 5Fbh5xe (ubatch-128, 27%) pass.

Scope

This halves the small-batch forgery window (~6× → ~3× under-declaration). The airtight fix is on-GPU throughput re-measurement (a pre-crown, would-beat-king gate that re-runs the config and compares declared vs measured tok/s) — a follow-up that composes with the PR #95 re-derivation machinery.

8 new tests; full suite green (bar 3 pre-existing env-only failures).

🤖 Generated with Claude Code

karpabot and others added 2 commits July 3, 2026 16:22
…ass)

The flat MAX_PLAUSIBLE_MFU cap is blind to micro_batch — the loophole a
forged-down wall_clock exploited. The per-forward matmul M-dim is
micro_batch*seq_len; small M underutilizes the tensor cores, so achievable
MFU drops sharply. #1217 declared 50% MFU at micro_batch=8/seq=512 (M=4096,
324k tok/s), a ~4.5x wall under-declaration; a real H100 there tops out ~11%
(measured, reproduced 3x on a rented H100). The flat 70% cap passed it.

- max_plausible_mfu(micro_batch, seq_len): ceiling rises with effective batch
  (M>=65536->0.70, 32768->0.60, 16384->0.50, 8192->0.42, 4096->0.33, else 0.25),
  set ~3x above empirically-achieved MFU so honest/optimized runs never trip it.
- check_compute_plausibility uses min(max_mfu, ceiling); unknown config -> flat
  cap (backward-compatible, never false-rejects).
- halves the small-batch forgery window (~6x -> ~3x); the airtight fix is on-GPU
  throughput re-measurement (a pre-crown would-beat-king gate) — follow-up.
- 8 tests: rejects #1217, accepts honest slow small-batch + the restored king
  (ubatch 64) + 5Fbh5xe (ubatch 128), large-batch forgery still caught by flat cap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants